package redis

import (
	"course_srv/models/mysql"
	"encoding/json"
	"fmt"
	"time"
)

func AddCourse(course mysql.Course) {

	marshal, _ := json.Marshal(course)
	key := fmt.Sprintf("course:%d", course.ID)
	Rdb.Set(key, marshal, time.Minute*10)

}
